//
// Created by jinbang.li on 2023/6/22.
//

#include "OpVideoView.h"
#include "./OpTexture.h"
void OpVideoView::SetRender(void *win) {
    view = win;
}
void OpVideoView::Render(OpData data) {
    if(!view) return;
    if(!texture){
        texture = OpTexture::Create();
        texture->Init(view);
    }
    texture->Draw(data.datas,data.width,data.height);
}